package com.shoddon.cloud.ribbon;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
	@Autowired
//    RestTemplate restTemplate;
	private ComputeService computeService;
    @RequestMapping(value = "/shoddon", method = RequestMethod.GET)
    public String shoddon() {
    	//消费COMPUTE-SERVICE的compute服务
//        return restTemplate.getForEntity("http://COMPUTE-SERVICE/compute?no1=10&no2=20", String.class).getBody();
    	return computeService.addService();
    }
}
